#pragma once

namespace OpenHash 
{
#include"hashtable.h"

	template<class K, class HF = HashFunc<K>>
	class unordered_set
	{
		struct SetKeyOfT { const K& operator()(const K& k) { return k; } };
	public:
		typedef typename HashBucket<K, K, SetKeyOfT, HF>::Iterator iterator;
		iterator begin() { return _hb.begin(); }
		iterator end() { return _hb.end(); }
		iterator find(const K& key) { return _hb.Find(key); }
		bool erase(const K& key) { return _hb.Erase(key); }
		pair<iterator, bool> insert(const K& key) { return _hb.Insert(key); }
	private:
		HashBucket<K, K, SetKeyOfT, HF> _hb;
	};
}
